package ru.iasokolov.demo.entity

import java.util.*


interface AbstractBaseService<Entity : AbstractBaseEntity> {
    fun save(entity: Entity): Entity

    fun findAll(): List<Entity>
    fun findById(entityId: UUID): Entity?

    fun update(entity: Entity): Entity
    fun updateById(entity: Entity, entityId: UUID): Entity?

    fun delete(entity: Entity)
    fun deleteById(entityId: UUID) // other methods u might need to be generic
}